<!--
 * @Description: 
 * @version: 
 * @Author: Eve
 * @Date: 2019-10-08 21:05:05
 * @LastEditors: Eve
 * @LastEditTime: 2019-10-08 21:29:32
 -->
<!DOCTYPE html>
<html lang="zh">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    html,
    body {
      margin: 0;
      padding: 0;
      height: 100%
    }

    .container {
      min-height: 100%;
      height: auto !important;
      height: 100%;
      /* IE6不识别min-height */
      position: relative;
    }

    .header,
    .footer {
      height: 60px;
      background-color: red;
    }

    .main {
      padding-bottom: 60px;
      /*padding等于footer的高度*/
      background-color:#000;
      height: 800px;
      padding-top:1px;
    }

    .footer {
      position: absolute;
      bottom: 0;
      width: 100%;
      /*footer的高度*/
    }
    .aaa{
      margin:10px;
      width:10px;
      height:10px;
      padding:10px;
      border:10px solid greenyellow;
      background-color:hotpink;
    }
  </style>
</head>

<body>
  <div class="container">
    <div class="header"></div>
    <div class="main">
      <div class="aaa"></div>
    </div>
    <div class="footer"></div>
  </div>
</body>

</html>